#汽车类
class Car:
    def __init__(self, model, color, make, mileage, year):
        self.model = model
        self.color = color
        self.make = make
        self.mileage = mileage
        self.year = year

    def get_mileage(self):
        return self.mileage

    def set_mileage(self, new_mileage):
        self.mileage = new_mileage

    def print_car_info(self):
        print(
            f"车型: {self.model}, 颜色: {self.color}, 品牌: {self.make}, 行驶里程: {self.mileage}, 出厂年份: {self.year}")

    def need_gas_tank(self):
        return True

#油车
class GasCar(Car):
    def need_gas_tank(self):
        return super().need_gas_tank()

#电车
class ElecCar(Car):
    def __init__(self, model, color, make, mileage, year, battery_capacity):
        super().__init__(model, color, make, mileage, year)
        self.battery_capacity = battery_capacity

    def Battery(self):
        return self.battery_capacity

    def need_gas_tank(self):
        return False